/* ========== buttons.theme - 按钮导航样式 ========== */
@import './colors';
@import './shadow';

.outline-toolbar {
  position: fixed;
  z-index: 99999;
  margin: 0;
  transition-duration: 0.3s;
  overflow: hidden;

  &__button {
    .shadow_light_regular();
    position: relative;
    z-index: 1;
    margin: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid @primary_border_color;
    border-radius: 3px;
    box-sizing: border-box;
    background-color: @white;
    cursor: pointer;
    text-align: center;
    color: @third_text_color;
    overflow: hidden;

    &:hover {
      color: @success_color;
      border-color: @success_color;
    }

    &.hide {
      display: none;
    }
  }

  &__anchor {
    &:link,
    &:visited,
    &:hover {
      color: @fourth_text_color;
      text-decoration: none;
    }

    &:hover {
      color: @success_color;
    }
  }

  &__icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    fill: currentcolor;
    overflow: hidden;
  }

  &_active {
    &.outline-toolbar {
      &__button {
        color: @white;
        background-color: @success_color;
        border-color: @success_color;

        &:hover {
          color: @white;
        }
      }
    }

    .outline-toolbar__anchor {
      &:link,
      &:visited,
      &:hover {
        color: @white;
      }
    }
  }

  &_rounded {
    &.outline-toolbar__button {
      border-radius: 18px;
    }
  }

  &_disabled {
    &.outline-toolbar,
    .outline-toolbar {
      &__anchor:link,
      &__anchor:visited,
      &__anchor:hover,
      &__button {
        cursor: not-allowed;
        color: @fourth_text_color;

        &:hover {
          color: @fourth_text_color;
        }
      }

      &__button {
        background-color: @disabled_bg_color;
      }
    }
  }

  &_ttb,
  &_btt {
    left: 50%;
    transform: translateX(-50%);

    .outline-toolbar__button {
      display: inline-block;
    }
  }

  &_ttb {
    top: 12px;

    &.outline-toolbar_hidden {
      top: -56px;
    }
  }

  &_btt {
    bottom: 12px;

    &.outline-toolbar_hidden {
      bottom: -56px;
    }
  }

  &_rtl,
  &_ltr {
    transform: translateY(-50%);
    width: 56px;
  }

  &_rtl {
    top: 50%;
    right: 12px;

    &.outline-toolbar_hidden {
      right: -86px;
    }
  }

  &_ltr {
    top: 50%;
    left: 12px;

    &.outline-toolbar_hidden {
      left: -86px;
    }
  }

  &_ttb,
  &_rtl,
  &_btt,
  &_ltr {
    .outline-toolbar__button {
      &.outline-toolbar_hidden {
        display: none;
      }
    }
  }
}
